<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<input id="input"></input>
<script>
test(function() {
    var input = document.getElementById('input');
    input.focus();
    assert_false(document.queryCommandEnabled('SelectAll'));

    input.value = 'x';
    input.focus();
    assert_true(document.queryCommandEnabled('SelectAll'));
}, 'SelectAll is not enabled if input is empty');
</script>
